const path = require("path");
const render = require('koa-art-template');
const router = require('../routers/index');
const bodyParser = require('koa-bodyparser');
function initConfig(app) {
    app.use(bodyParser());
    // process.cwd()可以读取项目的路径
    render(app, {
        root: path.join(process.cwd()),
        extname: '.html',
        debug: process.env.NODE_ENV !== 'production'
    });
    app.use(router.routes());
}
module.exports = initConfig;